home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
as2db1
/
general.frm
< prev
next >
Wrap
Text File
|
1994-01-07
|
32KB
|
1,141 lines
VERSION 2.00
Begin Form Form1
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "ASC2MDB"
ClientHeight = 4905
ClientLeft = 1560
ClientTop = 1920
ClientWidth = 5400
FillStyle = 0 'Solid
Height = 5595
Icon = GENERAL.FRX:0000
Left = 1500
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4905
ScaleWidth = 5400
Top = 1290
Width = 5520
Begin CommandButton cmdTranslate
Caption = "&Start"
Default = -1 'True
Height = 375
Left = 3600
TabIndex = 0
Top = 3240
Width = 1455
End
Begin CommandButton cmdExit
Cancel = -1 'True
Caption = "E&xit"
Height = 375
Left = 3600
TabIndex = 1
Top = 3840
Width = 1455
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Height = 495
Left = -10
TabIndex = 15
Top = 4440
Width = 5425
Begin SSPanel pnlStatus
BevelOuter = 1 'Inset
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H000000FF&
Height = 255
Left = 80
TabIndex = 16
Top = 165
Width = 5260
End
End
Begin SSFrame Frame3D5
Caption = "Replace Mode:"
ForeColor = &H00000000&
Height = 615
Left = 120
TabIndex = 14
Top = 2280
Width = 5175
Begin Label lblReplaceMode
BackColor = &H00C0C0C0&
Height = 255
Left = 120
TabIndex = 9
Top = 240
Width = 4815
End
End
Begin SSFrame Frame3D4
Caption = "Table Destination: "
ForeColor = &H00000000&
Height = 615
Left = 120
TabIndex = 12
Top = 1560
Width = 5175
Begin Label lblCurrTable
BackColor = &H00C0C0C0&
Height = 255
Left = 120
TabIndex = 13
Top = 240
Width = 4815
End
End
Begin SSFrame frameTableProcessing
Caption = "Table Processing"
ForeColor = &H00000000&
Height = 1335
Left = 120
TabIndex = 10
Top = 3000
Width = 3135
Begin Gauge Gauge1
Autosize = -1 'True
BackColor = &H0080FFFF&
ForeColor = &H000000FF&
Height = 360
InnerBottom = -5
InnerLeft = -5
InnerRight = -5
InnerTop = -5
Left = 240
Max = 100
NeedleWidth = 1
TabIndex = 11
Top = 360
Visible = 0 'False
Width = 2655
End
Begin Label lblElapsedTime
Alignment = 2 'Center
BackStyle = 0 'Transparent
Height = 255
Left = 120
TabIndex = 6
Top = 360
Visible = 0 'False
Width = 2775
End
Begin Label lblRecCount
Alignment = 2 'Center
BackStyle = 0 'Transparent
Height = 255
Left = 120
TabIndex = 7
Top = 960
Width = 2775
End
Begin Label lblDBCount
Alignment = 2 'Center
BackStyle = 0 'Transparent
Height = 255
Left = 120
TabIndex = 8
Top = 660
Visible = 0 'False
Width = 2775
End
End
Begin SSFrame Frame3D2
Caption = "Database Destination File:"
ForeColor = &H00000000&
Height = 615
Left = 120
TabIndex = 4
Top = 840
Width = 5175
Begin Label lblCurrDatabase
BackColor = &H00C0C0C0&
Height = 255
Left = 120
TabIndex = 5
Top = 240
Width = 4815
End
End
Begin SSFrame Frame3D1
Caption = "ASCII Source File:"
ForeColor = &H00000000&
Height = 615
Left = 120
TabIndex = 3
Top = 120
Width = 5175
Begin Label lblCurrInput
BackColor = &H00C0C0C0&
Height = 255
Left = 120
TabIndex = 2
Top = 240
Width = 4815
End
End
Begin CommonDialog cmdlg1
Left = 360
Top = 3240
End
Begin Menu mnuFile
Caption = "&File"
Begin Menu mnuFileExit
Caption = "E&xit"
End
End
Begin Menu mnuEdit
Caption = "&Edit"
Begin Menu mnuEditInput
Caption = "&ASCII Source"
End
Begin Menu mnuEditMDB
Caption = "&MDB Destination"
End
Begin Menu mnuEditTable
Caption = "&Table Destination"
End
Begin Menu mnuSep0
Caption = "-"
End
Begin Menu mnuEditReplMode
Caption = "&Replace Mode"
End
End
Begin Menu mnuHelp
Caption = "&Help"
Begin Menu mnuHelpContents
Caption = "Help &Contents"
End
Begin Menu mnuSep1
Caption = "-"
End
Begin Menu mnuHelpAbout
Caption = "&About"
End
End
End
' ASC2MDB
'copyright 1993 by Richard Curzon
'May be used freely as a personal utility but may not
' be sold without express permission from the author
'May be copied for personal use under these terms
Option Explicit
Dim InFileNum As Integer 'input file number, for emergency close
Dim localErrFileName 'copy of gcErrFileName that may be modified
'by command line
Dim AscErrorFlag As Integer
Sub AddNewOrSeekEdit (InFileLine)
Select Case ReplaceMode
Case Is < 4
gTabOut.AddNew
Case Else
gTabOut.Index = Mode45Index() 'func in SPECIFIC.BAS
gTabOut.Seek "=", Mid(InFileLine, gIOFld(Mode345Key()).inStart, gIOFld(Mode345Key()).inLength)
If gTabOut.NoMatch And ReplaceMode = 4 Then
gTabOut.AddNew
Else
gTabOut.Edit
End If
End Select
End Sub
Private Sub CheckBlockDeleteKey (InFileLine)
'Replace Mode 3 only, block delete
Dim SQL
Dim Msg, LogMsg
Dim CandidateValue
Dim KeyFound As Integer
Dim TestBDKey As Integer
Dim ds As DynaSet
pnlStatus = "deleting block...": DoEvents
TestBDKey = Mode345Key() 'Func in SPECIFIC.BAS
CandidateValue = Mid(InFileLine, gIOFld(TestBDKey).inStart, gIOFld(